package com.cn.service.server.sys.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cn.bean.dto.DataStructureDto;
import com.cn.bean.pojo.file.FileDetails;
import com.cn.bean.pojo.sys.DataStructureMainTable;
import com.cn.bean.pojo.sys.DataStructureSub_Table;
import com.cn.bean.pojo.sys.Sys_Sequence_Info_T;
import com.cn.mapper.dao.db1.FileUploadDao;
import com.cn.mapper.dao.db5.DataStructureDao;
import com.cn.service.server.admin.FileService;
import com.cn.service.server.sys.DataStructureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DataStructureServiceImpl extends ServiceImpl<DataStructureDao, DataStructureDto> implements DataStructureService {
    @Autowired(required = false)
    private DataStructureDao dataStructureDao;

    @Override
    public List<DataStructureDto> selectDataStructure(DataStructureDto dataStructureDto) {
        return dataStructureDao.selectDataStructure(dataStructureDto);
    }

    @Override
    public int insertDataStructureMain(DataStructureMainTable mainTable) {
         Boolean b=dataStructureDao.insertDataStructureMain(mainTable);
         if (b){
             return 1;
         }
        return 0;
    }

    @Override
    public int  insertDataStructureSub(DataStructureSub_Table subTable) {
        Boolean c=dataStructureDao.insertDataStructureSub(subTable);
        if (c){
            return 1;
        }
        return 0;
    }

    @Override
    public int delDataStructureMain(int id) {
        Boolean d=dataStructureDao.delDataStructureMain(id);
        if (d){
            return 1;
        }
        return 0;
    }

    @Override
    public List<DataStructureDto> selectSub(int id) {
        return dataStructureDao.selectSub(id);
    }

    @Override
    public List<DataStructureDto> selectAll(DataStructureDto dataStructureDto) {
        return dataStructureDao.selectAll(dataStructureDto);
    }

    @Override
    public int delDataStructureSub(int id) {
        Boolean e=dataStructureDao.delDataStructureSub(id);
        if (e){
            return 1;
        }
        return 0;
    }

    @Override
    public int updateMain(DataStructureMainTable mainTable) {
        Boolean f=dataStructureDao.updateMain(mainTable);
        if (f){
            return 1;
        }
        return 0;
    }

    @Override
    public int updateSub(DataStructureSub_Table subTable) {
        Boolean z=dataStructureDao.updateSub(subTable);
        if (z){
            return 1;
        }
        return 0;
    }

    @Override
    public Integer getDataStructureAutoid() {
        return dataStructureDao.getDataStructureAutoid();
    }

    @Override
    public Integer getDataStructureSubAutoid() {

        return dataStructureDao.getDataStructureSubAutoid();
    }

    @Override
    public Integer getSequenceInfoMain() {
        return dataStructureDao.getSequenceInfoMain();
    }

    @Override
    public Integer getSequenceInfoAutoid() {
        return dataStructureDao.getSequenceInfoAutoid();
    }

    @Override
    public Boolean insertSequenceInfo(Sys_Sequence_Info_T sysSequenceInfoT) {
        return dataStructureDao.insertSequenceInfo(sysSequenceInfoT);
    }

    @Override
    public Boolean delSequenceInfo(int id) {
        return dataStructureDao.delSequenceInfo(id);
    }

    @Override
    public List<DataStructureDto> selectAL(DataStructureDto dataStructureDto) {
        return dataStructureDao.selectAL(dataStructureDto);
    }


}
